Extending Dreamweaver Overview > The extension architecture > Extension types |
![]() ![]() ![]() |
A simple way to extend Dreamweaver is to add a button on the object panel. Then, each time the user drags that object onto the Design view of the Document window, Dreamweaver inserts the code associated with the object into the HTML. You create this kind of select-to-insert functionality by writing an object.
The following list represents the different ways you can extend Dreamweaver. You can extend Dreamweaver in one or all of the following ways: add objects to the Objects panel, add commands that insert or rearrange HTML tags and attributes, create your own floating panel, add client-side JavaScript behaviors, or write translators that convert specialized code into standard HTML.
The different extension types can be summarized as follows:
1 | ObjectAlso known as an "insert-only" extension. You write this type of extension to add a new object to the Objects panel. You create this type of extension by writing an HTML file that contains the code to be inserted into the document. It can also contain a form that gathers input from the user and JavaScript that processes the input. You place the HTML file in the Configuration/Objects/*folder (where * is a wildcard representing any subfolder) along with an icon in GIF format, and the extension appears on the Objects panel. |
2 | CommandA command is a menu item that invokes a script. When you create this type of extension, you add a new menu item to Dreamweaver. To create a command, you create a file that implements the functions in the commands API (What are commands?). If you want the command to appear in the "Commands" menu, just install the file in the Configuration/Commands folder. If you want the command to appear elsewhere in the menu system, you can customize the menu.xml file. When the user pops up a menu, the command can specify whether its menu item is grayed out or not. |
3 | PanelDreamweaver has panels that provide information about the current document and the current selection. You can add your own floating panel that interacts with the selection, the document, or the task, or that simply displays useful information. Floating panel files are files that contain HTML and JavaScript, and that live in the Configuration/Floaters folder. |
4 | InspectorInspectors are indispensable for defining, reviewing, and changing the name, size, appearance, and other attributes of the selection, as well as for launching internal and external editors for the selected element. Dreamweaver has several built-in interfaces for the Property inspector that let you set properties for many standard HTML tags. With custom property inspector files, you can override these built-in interfaces or create new ones to inspect custom tags. |
5 | BehaviorYou can add new behaviors to the Plus (+) menu in the Behaviors panel. A behavior is a user event plus an action. You write the action. To create a behavior, you write behavior code, create a user interface in HTML to get input, create a handler to the event to which you want your behavior associated, determine if your behavior applies to a given document, and apply the behavior in the appropriate location. The Configuration/Behaviors/Actions folder contains many examples of behaviors. |
6 | Data TranslatorA translator provides a visual representation of non-HTML code in the Design view of the Document window. It converts non-HTML code into HTML and locks the non-HTML code to prevent it from being parsed by Dreamweaver. You create translator extensions to represent non-HTML code in the Design view of the Document window. |
![]() |
![]() ![]() ![]() |